use domain::entity::{Gender,User};

pub struct UserQuery{
    id:u32
}
impl UserQuery{
    pub fn id(&self)->u32{
        self.id
    }
    pub fn create(id:u32)->Self{
        UserQuery{
            id
        }
    }
}
pub struct UserDTO{
    name: String,
    age: u8,
    gender:String 
}
impl UserDTO {
    pub fn name(&self) -> &String{
        &self.name
    }
    pub fn age(&self) -> u8{
        self.age
    }
    pub fn gender(&self) -> &String{
        &self.gender
    }
    
    pub fn create(user:&User)->Self{
        UserDTO{
            name:String::from(user.get_name()),
            age:user.get_age(),
            gender:user.get_gender().to_string()
        }
    }
}